﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UserModels;
using UserModels.DTO;

namespace UserRepositorys.Intface
{
    public interface IAccountRepository:IRepository<AccountInfoModel>
    {
        /// <summary>
        /// 查询全部账户信息
        /// </summary>
        /// <returns></returns>
        Task<List<AccountRoleDTO>> ShowAccount();

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="accountRole"></param>
        /// <returns></returns>
        Task<int> AddAccountRole(AccountRoleAddDTO accountRole);

        /// <summary>
        /// 添加账户信息
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        Task<int> AddAccount(AccountInfoModel account);

        /// <summary>
        /// 删除指定账户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int>DeleteAccount(int id);

        /// <summary>
        /// 数据反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<AccountInfoModel> GetAccountInfo(int id);

        /// <summary>
        /// 账户数据修改
        /// </summary>
        /// <param name="accountInfo"></param>
        /// <returns></returns>
        Task<int> UpdateAccount(AccountInfoModel accountInfo);

        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="UserAccount"></param>
        /// <param name="UserPass"></param>
        /// <returns></returns>
        Task<AccountInfoModel> GetAccountInfoById(string? AccountPhone, string? AccountPass);
    }
}
